# !/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
===========================
@Time : 2022/11/1 0001 21:13
@Author : 测试开发工程师
@File : goods_api.py
@Software: PyCharm
============================
"""

from last_testapi.service.api.litemall_api import LitemallApi


class GoodsApi(LitemallApi):

    def list(self, goods_name, order="desc", sort="add_time"):
        goodsId_url = "admin/goods/list"
        goodsId_data = {"name": goods_name, "order": order, "sort": sort}
        r = self.send("get", goodsId_url, params=goodsId_data)
        return r
